<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>  
<%@ page import="kr.cadis.clms.dao.DailySpendDao, kr.cadis.clms.model.DailySpend, java.sql.Date" %>    
<%
	out.print("귀신이 싾다.. 똥 싾다....");
	Date spendDate = Date.valueOf(request.getParameter("spendDate"));
	int money = Integer.parseInt(request.getParameter("money"));
	
	DailySpend dailySpend = new DailySpend();
	dailySpend.setMoney(money);
	dailySpend.setSpendDate(spendDate);
	
	DailySpendDao dailySpendDao = new DailySpendDao();
	boolean bf = dailySpendDao.insert(dailySpend);
	
	if(bf == true) {
		response.sendRedirect("List.jsp");		
	}
	else {		
%>
<script type="text/javascript">
<!--
		alert("사용 정보를  DB 에 입력하는 데 오류가 있습니다.");
		window.location.href = "List.jsp";
//-->
</script>
<%		
	}
%>